package adv4;

public class OccurNum {

	public static void main(String[] args) {
		String s1 = "qqqqqqq";
		String s2 = "qqq";
		int fromindex = 0;
		int count = 0;
		while ((fromindex = s1.indexOf(s2, fromindex)) != -1) {
			count++;
			fromindex += s2.length();
		}
		System.out.println(count);
	}

}
